﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
             x:Class="Lotto_SL.App">
    <Application.Resources>

        <Style x:Key="EuroButton" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal" />
                                    <vsm:VisualState x:Name="MouseOver" />
                                    <vsm:VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimation Duration="0:0:0.1"
                                                             Storyboard.TargetName="scaleTransform"
                                                             Storyboard.TargetProperty="ScaleX"
                                                             To="0.9"/>
                                            <DoubleAnimation Duration="0:0:0.1"
                                                             Storyboard.TargetName="scaleTransform"
                                                             Storyboard.TargetProperty="ScaleY"
                                                             To="0.9"/>
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>

                            <Ellipse Fill="Black"
                                     Width="{Binding ElementName=EuroImage, Path=ActualWidth}"
                                     Height="{Binding ElementName=EuroImage, Path=ActualHeight}" />

                            <Image x:Name="EuroImage"
                                   Source="/Lotto.Core;component/Images/euro.png"
                                   RenderTransformOrigin="0.5,0.5">
                                <Image.RenderTransform>
                                    <ScaleTransform x:Name="scaleTransform"  />
                                </Image.RenderTransform>
                            </Image>
                            
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </Application.Resources>
</Application>
